Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 13 pull requests #65548

Closed
wants to merge 34 commits into from
Closed

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Oct 18, 2019

Successful merges:

Failed merges:

r? @ghost

ehuss and others added 30 commits September 30, 2019 13:00
Instead of instaling OCaml bindings in a location where installation
will not fail, don't build them in the first place.
This wins 3% on `unicode_normalization`.
The commit also removes the debug statement, because they annoyed me.
This change wins another 1% on `unicode_normalization`, at least partly
because it no longer needs to increment `iteration`.
Building Servo with a recent Nightly produces:

```rust
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See rust-lang#29597
  --> components/script/lib.rs:14:1
   |
14 | #![plugin(script_plugins)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
   |
   = note: `#[warn(deprecated)]` on by default
```

First, linking to rust-lang#29597 is not ideal
since there is pretty much no discussion there of the deprecation
and what can be used instead.
This PR changes the link to the deprecation PR which does have more discussion.

Second, the “remove this attribute” suggestion is rather unhelpful.
Just because a feature is deprecated doesn’t mean that simply removing its use
without a replacement is acceptable.

In the case of custom lint, there is no replacement available.
Prefixing a message with “help:” when telling users that they’re screwed
honestly feels disrespectful.

This PR also changes the message to be more factual.
Co-Authored-By: Mark Rousskov <mark.simulacrum@gmail.com>
The current code has this impl:
```
impl<T: Into<TokenStream>> iter::FromIterator<T> for TokenStream
```
If given an `IntoIterator<Item = TokenTree>`, it will convert each individual
`TokenTree` to a `TokenStream` (at the cost of two allocations: a `Vec`
and an `Lrc`). It will then merge those `TokenStream`s into a single
`TokenStream`. This is inefficient.

This commit changes the impl to this less general one:
```
impl iter::FromIterator<TokenTree> for TokenStream
```
It collects the `TokenTree`s into a single `Vec` first and then converts that
to a `TokenStream` by wrapping it in a single `Lrc`. The previous generality
was unnecessary; no other code needs changing.

This change speeds up several benchmarks by up to 4%.
Because most of the call sites have an easier time working with a
`TokenTree` instead of a `TokenStream`.
Likewise for `NestedMetaItem::tokens()`. Also, add
`MetaItemKind::token_trees_and_joints()`, which `MetaItemKind::tokens()`
now calls.

This avoids some unnecessary `TokenTree` to `TokenStream` conversions,
and removes the need for the clumsy
`TokenStream::append_to_tree_and_joint_vec()`.
Document JSON message output.

This documents the JSON messages in the rustc book.
Disable Go and OCaml bindings when building LLVM

Instead of instaling OCaml bindings in a location where installation
will not fail, don't build them in the first place.
…-E0575, r=kinnison

Add long error explanation for E0575

Part of rust-lang#61137.
…komatsakis

Add more coherence tests

I've wrote the missing test cases listed in [this google doc](https://docs.google.com/spreadsheets/d/1WlroTEXE6qxxGvEOhICkUpqguYZP9YOZEvnmEtSNtM0/edit#gid=0)

> The other thing that might be useful is to rename the existing tests so they all fit the new naming scheme we were using.

I'm not entirely sure how to do this. If everything from the google sheet is covered could I just remove the remaining tests in `src/test/ui/coherence` or is there something in there that should remain?

cc rust-lang#63599

r? @nikomatsakis
…Tree-to-TokenStream-conversions, r=petrochenkov

Avoid unnecessary `TokenTree` to `TokenStream` conversions

A `TokenStream` contains any number of `TokenTrees`. Therefore, a single `TokenTree` can be promoted to a `TokenStream`. But doing so costs two allocations: one for the single-element `Vec`, and one for the `Lrc`. (An `IsJoint` value also must be added; the default is `NonJoint`.)

The current code converts `TokenTree`s to `TokenStream`s unnecessarily in a few places. This PR removes some of these unnecessary conversions, both simplifying the code and speeding it up.

r? @petrochenkov
…sakis

Use a sharded dep node to dep node index map

Split out from rust-lang#61845 and based on rust-lang#63756.

r? @nikomatsakis
…size, r=nikomatsakis

Speed up `LexicalResolve::expansion()`

A couple of improvements that speed up `unicode_normalization` by about 4%. The first commit was enabled by the improvements to `BitSet` iteration in rust-lang#65425.

r? @nikomatsakis
…-E0584, r=kinnison

Add long error explanation for E0584

Part of rust-lang#61137.

r? @kinnison
properly document panics in div_euclid and rem_euclid

For signed numbers, document that `div_euclid` and `rem_euclid` panic not just when `rhs` is 0, but also when the division overflows.

For unsigned numbers, document that `div_euclid` and `rem_euclid` panic when `rhs` is 0.
Plugins deprecation: don’t suggest simply removing the attribute

Building Servo with a recent Nightly produces:

```rust
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See rust-lang#29597
  --> components/script/lib.rs:14:1
   |
14 | #![plugin(script_plugins)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
   |
   = note: `#[warn(deprecated)]` on by default
```

First, linking to rust-lang#29597 is not ideal since there is pretty much no discussion there of the deprecation and what can be used instead. This PR changes the link to the deprecation PR which does have more discussion.

Second, the “remove this attribute” suggestion is rather unhelpful. Just because a feature is deprecated doesn’t mean that simply removing its use without a replacement is acceptable.

In the case of custom lint, there is no replacement available. Prefixing a message with “help:” when telling users that they’re screwed honestly feels disrespectful.

This PR also changes the message to be more factual.
…r=simulacrum

add option to ping llvm ice-breakers to triagebot
reorder fmt docs for more clarity

I adjusted these docs in rust-lang#65332 but wasn't happy with the result when seeing it in rustdoc. So this reorders the subsections in the "Formatting Parameters" section to be more logical (subsections that reference `width` come after the `width` subsection) and they also all have examples now.
Update backtrace to 0.3.40

Diff: rust-lang/backtrace-rs@0.3.37...b5cc5b1

Pretty low risk, considering the only changes are in low-tier targets.

r? @cramertj
cc @alexcrichton
@tmandry
Copy link
Member Author

tmandry commented Oct 18, 2019

@bors r+ p=13 rollup=never

@bors
Copy link
Contributor

bors commented Oct 18, 2019

📌 Commit 772a8d2 has been approved by tmandry

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 18, 2019
@bors
Copy link
Contributor

bors commented Oct 18, 2019

⌛ Testing commit 772a8d2 with merge cf57b72ec3522283c50fcc81d91e645bc9da88bf...

@tmandry tmandry added the rollup A PR which is a rollup label Oct 18, 2019
@tmandry
Copy link
Member Author

tmandry commented Oct 18, 2019

#65531 (comment) points out that that PR is likely to fail, so closing this in favor of a rollup without that PR.
@bors retry r-

@tmandry tmandry closed this Oct 18, 2019
@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 18, 2019
@tmandry tmandry deleted the rollup-kvfjxt2 branch October 18, 2019 07:20
@dtolnay
Copy link
Member

dtolnay commented Dec 13, 2019

For some reason this is still in the bors queue...?

@bors p- rollup-

@dtolnay
Copy link
Member

dtolnay commented Dec 13, 2019

@bors ping

@bors
Copy link
Contributor

bors commented Dec 13, 2019

😪 I'm awake I'm awake

@dtolnay
Copy link
Member

dtolnay commented Dec 13, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Dec 13, 2019

📌 Commit 772a8d2 has been approved by dtolnay

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 13, 2019
@dtolnay
Copy link
Member

dtolnay commented Dec 13, 2019

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.